import Config from "../main.config";
import Ajax from "../utils/Ajax";
module.exports = {
    /*
    * 关注
    * */
    addFocus: async function (data = {}) {
        let url = Config.api.collectionAdd;
        return Ajax.request({
            method: "POST",
            url,
            data: {
                type: 1,
                ...data,
            }
        })
    },

    /*
    * 取消关注
    * */
    delFocus: async function (data = {}) {
        let url = Config.api.collectionDel;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取学生关注列表
    * */
    getStudentFocusList: async function (data = {}) {
        //userId
        let url = Config.api.collectStudentFocusList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取学生粉丝列表
    * */
    getStudentFansList: async function (data = {}) {
        let url = Config.api.collectStudentFansList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取学生关注列表
    * */
    getPersonnelFocusList: async function (data = {}) {
        let url = Config.api.collectPersonnelFocusList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取学生粉丝列表
    * */
    getPersonnelFansList: async function (data = {}) {
        let url = Config.api.collectPersonnelFansList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 收藏职位
    * */
    addCollect: async function (data = {}) {
        let url = Config.api.collectionAdd;
        return Ajax.request({
            method: "POST",
            url,
            data: {
                type: 2,
                ...data,
            }
        })
    },

    /*
    * 获取收藏列表 -- 学生
    * */
    getStudentCollectList: async function (data = {}) {
        let url = Config.api.collectStudentList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },
}